<!-- 查看执行记录详情模态框 -->
<div class="modal fade" id="detailModal" tabindex="-1" aria-labelledby="detailModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-xl modal-fullscreen-lg-down">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="detailModalLabel">执行记录详情</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <div class="row mb-3">
                    <div class="col-md-6">
                        <div class="card">
                            <div class="card-header">
                                <h5 class="mb-0">基本信息</h5>
                            </div>
                            <div class="card-body">
                                <table class="table">
                                    <tbody>
                                        <tr>
                                            <th>ID</th>
                                            <td id="record-id"></td>
                                        </tr>
                                        <tr>
                                            <th>场景</th>
                                            <td id="record-scene"></td>
                                        </tr>
                                        <tr>
                                            <th>环境</th>
                                            <td id="record-environment"></td>
                                        </tr>
                                        <tr>
                                            <th>状态</th>
                                            <td id="record-status"></td>
                                        </tr>
                                        <tr>
                                            <th>触发方式</th>
                                            <td id="record-trigger"></td>
                                        </tr>
                                        <tr>
                                            <th>开始时间</th>
                                            <td id="record-start-time"></td>
                                        </tr>
                                        <tr>
                                            <th>结束时间</th>
                                            <td id="record-end-time"></td>
                                        </tr>
                                        <tr>
                                            <th>耗时</th>
                                            <td id="record-duration"></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="card">
                            <div class="card-header">
                                <h5 class="mb-0">变量</h5>
                            </div>
                            <div class="card-body">
                                <div id="record-variables"></div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-header">
                        <h5 class="mb-0">执行步骤</h5>
                    </div>
                    <div class="card-body">
                        <div id="record-steps" class="record-steps">
                            <!-- 执行步骤将通过JavaScript动态加载 -->
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="rerun-btn">重新执行</button>
            </div>
        </div>
    </div>
</div>